import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';

export const columns: BasicColumn[] = [
    {
    title: '日志ID',
    dataIndex: 'logId'
   },
   {
    title: '服务器IP',
    dataIndex: 'systemIp'
   },
   {
    title: '日志描述',
    dataIndex: 'logRemark'
   },
   {
    title: 'CPU使用率',
    dataIndex: 'cpuUsed'
   },
   {
    title: 'JVM总内存(G)',
    dataIndex: 'jvmTotal'
   },
   {
    title: 'JVM已使用(G)',
    dataIndex: 'jvmUsed'
   },
   {
    title: '磁盘总大小(G)',
    dataIndex: 'diskTotal'
   },
   {
    title: '磁盘已占用(G)',
    dataIndex: 'diskUsed'
   },
   {
    title: '系统总内存(G)',
    dataIndex: 'memoryTotal'
   },
   {
    title: '系统内存已使用(G)',
    dataIndex: 'memoryUsed'
   },
   {
    title: '组织机构编号',
    dataIndex: 'sysOrgCode'
   },
   {
    title: '删除标识',
    dataIndex: 'delFlag'
   },
];

export const searchFormSchema: FormSchema[] = [
 {
    label: '日志ID',
    field: 'logId',
    component: 'InputNumber'
  },
 {
    label: '服务器IP',
    field: 'systemIp',
    component: 'Input'
  },
];

export const formSchema: FormSchema[] = [
  // TODO 主键隐藏字段，目前写死为ID
  {label: '', field: 'id', component: 'Input', show: false},
  {
    label: '日志ID',
    field: 'logId',
    component: 'InputNumber',
  },
  {
    label: '服务器IP',
    field: 'systemIp',
    component: 'Input',
  },
  {
    label: '日志描述',
    field: 'logRemark',
    component: 'Input',
  },
  {
    label: 'CPU使用率',
    field: 'cpuUsed',
    component: 'InputNumber',
  },
  {
    label: 'JVM总内存(G)',
    field: 'jvmTotal',
    component: 'InputNumber',
  },
  {
    label: 'JVM已使用(G)',
    field: 'jvmUsed',
    component: 'InputNumber',
  },
  {
    label: '磁盘总大小(G)',
    field: 'diskTotal',
    component: 'InputNumber',
  },
  {
    label: '磁盘已占用(G)',
    field: 'diskUsed',
    component: 'InputNumber',
  },
  {
    label: '系统总内存(G)',
    field: 'memoryTotal',
    component: 'InputNumber',
  },
  {
    label: '系统内存已使用(G)',
    field: 'memoryUsed',
    component: 'InputNumber',
  },
  {
    label: '组织机构编号',
    field: 'sysOrgCode',
    component: 'Input',
  },
  {
    label: '删除标识',
    field: 'delFlag',
    component: 'Input',
  },
];
